package com.example.hyw.szysteam.arithmetic;

/**
 * Created by HYW on 2018/6/11.
 */

public class MinTree {
    public static boolean maxTree(Tree t1,Tree t2){
        int max=Count.Max(t1.getValue(),t2.getValue());
        if(max==1){
            return true;
        }else if(max==2){
            return false;
        }else if(RPN.priority(t1.getDate().toString(),t2.getDate().toString())){
            if(t2.getLeft()==null || t1.getLeft()==null){
                return true;
            }
            max=Count.Max(t1.getLeft().getValue(),t2.getLeft().getValue());
            if (max==1){
                return true;
            }else if(max==2){
                return false;
            }else {
                return true;
            }
        }
        return false;
    }
}
